package asteroids.model.programs.Expression;

/**
* 
* @version 0.3
* @author  Tandan Sunil, Van Deun Luca
*
*/
public abstract class BinaryCalculationExpression extends CalculationExpression {

	public BinaryCalculationExpression(int line, int column,Expression e1,Expression e2) {
		super(line, column);
		if( ! canHaveAsExpression(e2))
				throw new IllegalArgumentException("Cannot have the given first expression as its expression at line:"+line);
		if(! canHaveAsExpression(e2))
			throw new IllegalArgumentException("Cannot have the given second expression as its expression at line:"+line);
		this.e1=(IDoubleExpression) e1;
		this.e2 = (IDoubleExpression) e2;
	}
	
	private IDoubleExpression e1,e2;
	public IDoubleExpression getFirstExpression(){
		return e1; 
	}
	
	public IDoubleExpression getSecondExpression(){
		return e2;
	}
	

}
